﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JinDu4.aspx.cs" Inherits="syc.Fc.JinDu4" %>
<html>
<head>
</head>
<body>
<script type="text/javascript" language="javascript" src="/common.js"></script>
<form id="form1" runat="server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
    onselected="SqlDataSource1_Selected"></asp:SqlDataSource>
<asp:Label ID="SqlText" runat="server" Text="" Visible="false"></asp:Label>

<div id="wintop" class="wintop">生产日进度数据管理</div>
<asp:Panel ID="Panel1" runat="server" CssClass="panel">
<input type="button" value="录 入" class="button" onclick="parent.swin2_load('/Fc/JinDu4_In.aspx',640,430);"/>
<asp:Button ID="Button_Edit" runat="server" Text="查看/修改" CssClass="button" UseSubmitBehavior="False" />
<asp:Button ID="Button_Delete" runat="server" Text="删 除" CssClass="button" UseSubmitBehavior="False"
onclick="Button_Delete_Click" OnClientClick="if(!confirm('确认要删除该条记录吗？'))return(false);" />
<asp:Button ID="Button_Lock" runat="server" Text="上报生产处" CssClass="button2" 
    UseSubmitBehavior="False" onclick="Button_Lock_Click"  OnClientClick="if(!confirm('确认要上报生产处吗？\n进度数据上报生产处后不能再随意修改。\n要修改需请示生产处。'))return(false);"/>
</asp:Panel>

<asp:Panel ID="Panel2" runat="server" CssClass="panel" GroupingText="生成进度记录查询">
工 段：<asp:DropDownList ID="GongDuan" runat="server" 
Width="120px">
    <asp:ListItem Value="0">全部</asp:ListItem>
    <asp:ListItem Value="1">甲班</asp:ListItem>
    <asp:ListItem Value="2">乙班</asp:ListItem>
    <asp:ListItem Value="3">丙班</asp:ListItem>
    <asp:ListItem Value="4">丁班</asp:ListItem>
</asp:DropDownList>
<span style="margin-left:24px;"></span>产 品：<asp:DropDownList ID="ChanPin" runat="server" Width="120px">
    <asp:ListItem Value="0">全部</asp:ListItem>
    <asp:ListItem Value="2">套管螺纹保护器</asp:ListItem>
    <asp:ListItem Value="1">油管螺纹保护器</asp:ListItem>
</asp:DropDownList>
<div style="font-size:6px;height:6px;line-height:6px;"></div>
日 期：<asp:TextBox ID="Date1" runat="server" CssClass="textbox" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" />

<span style="margin-left:8px;"></span>
截 止：<asp:TextBox ID="Date2" runat="server" CssClass="textbox" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date2').value, document.getElementById('Date2'));" />

<span style="margin-left:5px;"></span><asp:Button ID="Button_Query" runat="server" Text="查 询" CssClass="mbutton" 
    UseSubmitBehavior="False" onclick="Button_Query_Click" />
<asp:Button ID="Button_Reset" runat="server" Text="复 位" CssClass="mbutton" 
UseSubmitBehavior="False" onclick="Button_Reset_Click" />
</asp:Panel>

<div class="gridframe">
<div class="gridview">

    <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#e5cfab">
        <tr>
            <td class="grid-title">生产日进度数据</td>
        </tr>
        <tr>
            <td class="grid-back">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" CssClass="grid" DataKeyNames="ID,锁定" 
                    DataSourceID="SqlDataSource1" 
                    GridLines="None" ondatabound="GridView1_DataBound" 
                    onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="True" 
                    UseAccessibleHeader="False" 
                    onselectedindexchanged="GridView1_SelectedIndexChanged" >
                    <PagerSettings Visible="False" />
                    <RowStyle CssClass="grid-row-normal" />
                    <Columns>
                    
                        <asp:TemplateField HeaderText="锁定" ItemStyle-BackColor="#ffffff" SortExpression="锁定">
                            <ItemTemplate>
                                <asp:Button ID="Button1" runat="server" CommandName="Select" Text="选择" CssClass="hide"/>
                                <img align="middle" src='/images/lock_<%# Eval("锁定") %>.gif' />
                            </ItemTemplate>
                            <HeaderStyle CssClass="grid-header" />
                            <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="50px" />
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="日期" SortExpression="日期">
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("日期","{0:D}") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle CssClass="grid-header" />
                            <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                        </asp:TemplateField>  
                        
                        <asp:TemplateField HeaderText="班组" SortExpression="班组">
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("班组") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle CssClass="grid-header" />
                            <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="70px" />
                        </asp:TemplateField>
                           <asp:TemplateField HeaderText="产品类别" SortExpression="产品类别">
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# Bind("产品类别") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle CssClass="grid-header" />
                            <ItemStyle CssClass="grid" HorizontalAlign="Left" Width="150px" />
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="车 丝(个)" SortExpression="车丝">
                            <ItemTemplate>
                                <asp:Label ID="Label_cs" runat="server" Text='<%# Eval("车丝") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle CssClass="grid-header" />
                            <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="80px" />
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="入库重量(套)" SortExpression="入库">
                            <ItemTemplate>
                                <asp:Label ID="Label7" runat="server" Text='<%# Eval("入库") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle CssClass="grid-header" />
                            <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="80px" />
                        </asp:TemplateField>
                        
                        
                       <asp:TemplateField HeaderText="填报人" SortExpression="填报人">
                            <ItemTemplate>
                                <asp:Label ID="Label8" runat="server" Text='<%# Eval("填报人") %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle CssClass="grid-header" />
                            <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="80px" />
                        </asp:TemplateField>
                        
                        
                    </Columns>
                    <SelectedRowStyle CssClass="grid-row-selected" />
                  </asp:GridView>
            </td>
        </tr>
        <tr>
            <td>   
                <table width="100%">
                    <tr>
                        <td class="pagebar">
                            <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" UseSubmitBehavior="false"
                                CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                            <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页"  UseSubmitBehavior="false"
                                CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                            <input type="button" class="page-split" />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                ontextchanged="Pager_Click" AutoPostBack="true"></asp:TextBox>页<input type="button" class="page-split" /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" />
                            
                            <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页"  UseSubmitBehavior="false"
                                CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                            <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页"  UseSubmitBehavior="false"
                                CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" />
                        </td>
                        <td class="pagebar" align="right">
                            <asp:Label ID="Label_Total" runat="server" Text=""></asp:Label>
                        </td>
                    </tr>
               </table>

            </td>
        </tr>
    </table>
    

</div>
</div>

</form>
<script>
var notice = '<%=this.Notice %>';
if (notice != '') {
    parent.showmsgbox(notice);
}
var i;
var rows = document.getElementsByTagName("tr");
for (i = 0; i < rows.length; i++) {

    if (rows[i].className == "grid-row-normal") {
        rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
        rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
        rows[i].onclick = function() { this.firstChild.firstChild.click(); };
    }
}
var tds = document.getElementsByTagName("td");
for (i = 0; i < tds.length; i++) {
    if (tds[i].className == "detailheader") {
        tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
    }
}


//document.getElementById("Date1").onfocus = document.getElementById("Date2").onfocus = function() {
//makecalendar(this.value, this);
//};
document.onkeydown = function(e) {
    if (!e) e = window.event;
    var tag = e.srcElement;
    if (!tag) tag = e.target;
    if (tag.tagName == "INPUT" && tag.className == "textbox" || tag.tagName == "SELECT") {
        if (e.keyCode == 13) e.keyCode = 9;
    }
}

</script>
</body>
</html>
